﻿
using HiSport.Core.Entity.HiSportEntity.Bas;

namespace HiSport.Application.HiSportService.Bas.BasRuleManagement.BillingRules.Dtos
{

    public class BillingRulePageDto : BasePageInput
    {
        /// <summary>
        /// 规则名称
        /// </summary>
        public string RuleName { get; set; }

        /// <summary>
        /// 启用停用
        /// </summary>
        public StatusEnum? Status { get; set; }
    }



    /// <summary>
    /// 计费规则
    /// </summary>
    public class BillingRuleDto: BasBillingRule
    {
        public string VenueName { get; set; }
        /// <summary>
        /// 计费规则
        /// </summary>
        public List<BillingRuleInfoDto> BillingRuleInfos { get; set; }
    }

    /// <summary>
    /// 计费规则详情
    /// </summary>
    public class BillingRuleInfoDto: BasBillingRuleInfo
    {
        /// <summary>
        /// VIP详细会员价格
        /// </summary>
        public List<VIPPronPrice> MemberPrice { get; set; }
    }

    /// <summary>
    /// 计费规则续爱的会员等级计费
    /// </summary>
    public class BasBillingRuleInfoMemberDto : BasBillingRuleInfoMember
    {

    }

    public class BillingRuleCreateOrUpDateDto
    {
        public long? Id { get; set; }

        /// <summary>
        /// 规则名称
        /// </summary>
        [Required, MaxLength(20)]
        public string RuleName { get; set; }

        /// <summary>
        /// 场馆Id
        /// </summary>
        public long VenuesId { get; set; }

        public int Sort { get; set; }
        public List<BillingRuleInfoCreateOrUpDateDto> BillingRuleInfos { get; set; }
    }
    public class BillingRuleInfoCreateOrUpDateDto
    {

        public long Id { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public int StartTime { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public int EndTime { get; set; }

        /// <summary>
        /// 普通会员价格
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// vip价格类型  0：统一设置  1：详细设置
        /// </summary>
        public MemberPriceTypeEnum MemberPriceType { get; set; }

        /// <summary>
        /// VIP统一会员价格
        /// </summary>
        public decimal MemberUnifyPrice { get; set; }


        /// <summary>
        /// VIP详细会员价格
        /// </summary>
        public List<VIPPronPrice> MemberPrice { get; set; }
    }

    public class VIPPronPrice
    {
        /// <summary>
        /// 会员等级
        /// </summary>
        public long GradeId { get; set; }
            
        /// <summary>
        /// 会员价格
        /// </summary>
        public decimal Price { get; set; }
    }

    /// <summary>
    /// 启用/禁用 场地计费规则
    /// </summary>
    public class EnableDisableBillingRuleDto
    {
        public long BillingRuleId { get; set; }

        public StatusEnum Status { get; set; }
    }

    public class BillingRuleListDto
    {
        /// <summary>
        /// 场馆
        /// </summary>
        public long? VenueId { get; set; }

        /// <summary>
        /// 厂区
        /// </summary>
        public long? SiteTypeId { get; set; }
    }
}
